//line 1 = number of test cases, next lines are number of cells
import java.util.Scanner;
/**
 * Write a description of class numberOfCells here.
 * 
 * @author Josh Lear
 * @version 6/14/2014
 * Simulation, Mod arithmetic.
 */
public class TJU_2076{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
            int numberOfCases = sc.nextInt();
            for(int index = 0; index < numberOfCases; index++){
                int numberOfCells = sc.nextInt();
                int[] cells = new int[numberOfCells];
                int sum = 0;
                
                for(int index4 = 0; index4 < numberOfCells; index4++){
                    cells[index4] = 0; 
                }
                
                for(int index2 = 0; index2 < numberOfCells; index2++){
                    int mod = index2 + 1;
                  for(int index3 = 0; index3 < numberOfCells; index3++){
                    if((index3 + 1) % mod == 0){
                        if(cells[index3] == 0){
                            cells[index3] = 1;
                        }
                        else{
                            cells[index3] = 0;
                        }
                    }
                }  
                }
                for(int index5 = 0; index5 < numberOfCells; index5++){
                    sum = sum + cells[index5];
                }
                System.out.println(sum);
            }
        
    }
}
